package com.liang.io;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyFile {
    public static void main(String[] args) throws IOException {

        long start = System.currentTimeMillis();
        FileInputStream fis = new FileInputStream("D:\\123\\123.wmv");
        FileOutputStream fos = new FileOutputStream("D:\\itheima\\123.wmv");

        byte[] b = new byte[1024*1024];
        int len;
        while ((len = fis.read(b)) != -1) {
            fos.write(b,0,len);
        }
        fos.close();
        fis.close();
        long end = System.currentTimeMillis();

        System.out.println(end-start);
    }
}
